package com.bbcare.followup.plat.service;

import java.util.List;
import java.util.Map;

import com.bbcare.followup.plat.entity.Patient;
import com.bbcare.followup.plat.entity.PtDevelopstandardData;

/**
 *
 * @name:         家庭数据报告接口
 * @author:       tao
 * @createTime:   2017年4月24日
 * @description:  家庭数据报告统一接口类
 * @modify:
 *
 */
public interface IFamilyReportService {
    // 查询患者氧饱脉率时段监控记录列表
    List<Map<String, Object>> getOxygenPulserateHistory(Map<String, Object> paramMap) throws Exception;

    // 按天 为单位 查询氧饱脉率监控记录
    List<Map<String, Object>> getOxygenPulserateHistoryByDay(Map<String, Object> paramMap) throws Exception;

    // 查询氧饱脉率某时段记录详情接口
    Map<String, Object> getOxygenPulserateDetailById(Map<String, Object> paramMap) throws Exception;

    // 查询一天氧饱脉率某时段记录详情接口
    Map<String, Object> getOxygenPulserateDetailByDay(Map<String, Object> paramMap) throws Exception;

    //获取患者氧饱脉率时段监控记录总数
    int getOxygenPulserateHistoryCount(Map<String, Object> paramMap) throws Exception;

    //获取患者氧饱脉率时段监控记录总数 以天为单位
    int getOxygenPulserateHistoryCountByDay(Map<String, Object> paramMap) throws Exception;

    // 查询患者体温时段监控记录列表
    List<Map<String, Object>> getBodytemperatureHistory(Map<String, Object> paramMap) throws Exception;

    // 查询体温某时段记录详情接口
    Map<String, Object> getBodytemperatureDetailById(Map<String, Object> paramMap) throws Exception;

    //获取患者体温时段监控记录总数
    int getBodytemperatureHistoryCount(Map<String, Object> paramMap) throws Exception;

    //获监测数据体温、氧饱脉率  监测异常统计
    List<Map<String,Object>> getMonitorDataStatistics(Map<String, Object> paramMap) throws Exception;

    //体温、氧饱脉率监测次数统计
    List<Map<String,Object>> getmonitorTimesStatistics(Map<String, Object> paramMap)throws Exception ;

    //检测列表页面统计数据  体温、氧饱脉率检测患者数统计
    Map<String,Object> getpatientsStatistics(Map<String, Object> paramMap)throws Exception ;

    // 查询体温检测 患者列表
    List<Map<String, Object>> getBodyTemperaturePatientList(Map<String, Object> paramMap) throws Exception;

    //查询氧饱脉率检测 患者列表
    List<Map<String, Object>> getOxygenPulseratePatientList(Map<String, Object> paramMap) throws Exception;

    //查询生长发育 患者列表
    List<Map<String, Object>> getGrowthPatientList(Map<String, Object> paramMap) throws Exception;

    int getOxygenPulseratePatientCount(Map<String, Object> paramMap) throws Exception;

    int getBodyTemperaturePatientCount(Map<String, Object> paramMap) throws Exception;

    int getGrowthPatientCount(Map<String, Object> paramMap) throws Exception;

    // 查询患者生长发育评估记录列表
    List<Map<String, Object>> getGrowthHistory(Map<String, Object> paramMap) throws Exception ;

    //查询患者生长发育评估基本信息
    Map<String, Object> getGrowthDeatail(Map<String, Object> paramMap) throws Exception ;

    int save(Map<String, Object> list) throws Exception;
    int save(List<PtDevelopstandardData> list) throws Exception;

    Map<String, Object> getGrowthPercentiles(Map<String, Object> paramMap,String ageType,Patient patient)throws Exception;

    Map<String, Object> getPercentiles(Map<String, Object> paraMap) throws Exception;

    Map<String, Object> getGrowthZscore(Map<String, Object> paramMap,String ageType,Patient patient)throws Exception;

    Map<String, Object> getGrowthCurvedata(Map<String, Object> paramMap) throws Exception;

    //添加生长发育记录
    Map<String, Object> addGrowthRecord(Map<String, Object> paramMap) throws Exception;

    //氧饱脉率、温度、生长发育  数据同步 from app
    void oxygenpulserateSynchData(Map<String,Object> paramMap)throws Exception;
    void bodyTemperatureSynchData(Map<String, Object> paramMap)throws Exception;
    Map<String, Object> addGrowthRecordBySyn(Map<String, Object> paramMap)throws Exception ;

    Map<String, Object> getlastGrowth(Map<String, Object> paramMap)throws Exception ;

    //fenton百分位
    Map<String, Object> getGrowthFentonPercent(Map<String, Object> paramMap,Patient patient)throws Exception;
    //fenton得分
    Map<String, Object> getGrowthFentonScore(Map<String, Object> paramMap,Patient patient)throws Exception;

    //安医大 根据年龄和生长发育百分位级别 查找指导意见
    List<String> getGrowthGuideListNew(List<Map<String,Object>> curvadataList,Map<String,Object> param) throws Exception;

    //删除报告根据id
    void deleteGrowthRecordById(String recordId) throws Exception;

    /**
     *  根据2005年9市生长评价数值表，计算出生体格P值8档。
     *  @param paraMap
     *  @return
     * */
    Map<String,Object> getBirthPercentiles(final Map<String,Object> paraMap);

}
